<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<base th:href="@{/}">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />
	<th:block th:include ="commHeaderInclude::commHead"></th:block>

	<title>录入放款信息</title>
	<style>
		.form{}
		.form .error{ color: #f30; margin-left: 20px; display: none;}
		.form .tips{ margin-left: 5px;}
	</style>
</head>
<body class="ht">
<th:block th:include="commHeaderInclude::loading"></th:block>
<div class="content-wrapper">
	<!--
	<div class="breadCrumb">
		<i class="mdi mdi-map-marker"></i>
		<span>医保贷业务系统<i class="mdi mdi-chevron-double-right"></i>融资服务<i class="mdi mdi-chevron-double-right"></i>我要融资</span>
	</div>
	-->
	<div class="card mb-3">
		<div class="card-body">
			<h4 class="card-title">融资申请信息</h4>
			<div class="module" th:object="${result.data.finance}">
				<table cellpadding="0" cellspacing="0" class="vTable">
					<tbody>
					<tr>
						<th>中征融资申请编号</th>
						<td><a class="textLink-primary clickToViewed" th:text="*{financeNo}" th:href="@{|/base/finance/detail?id=*{id}&aid=*{aid}|}">中征融资申请编号</a>  <a class="btn btn-outline-primary btn-sm" th:href="@{|/base/finance/download3in1?id=*{id}&aid=*{aid}|}" target="bridge">打包下载</a></td>
					</tr>
					<tr>
						<th>医保定点机构</th>
						<td th:text="*{@util.fStr(orgName)}">医保定点机构</td>
					</tr>
					<tr>
						<th>医保统筹地区</th>
						<td th:text="*{areaName}">医保统筹地区</td>
					</tr>
					<tr>
						<th>资金方</th>
						<td th:text="*{@util.fStr(bankOrgName)}">资金方</td>
					</tr>
					<tr>
						<th>申请时间</th>
						<td th:text="*{#dates.format(applyTime,'yyyy-MM-dd HH:mm:ss')}">申请时间</td>
					</tr>
					<tr>
						<th>申请金额（元）</th>
						<td th:text="*{#numbers.formatDecimal(financeAmount,1,'COMMA',2,'POINT')}">申请金额</td>
					</tr>
					<tr>
						<th>币种</th>
						<td><span class="required">人民币元</span></td>
					</tr>
					</tbody>
				</table>
			</div>
		</div>
	</div>


	<form name="form" id="form" class="form" method="post" th:object="${dto}" onsubmit="ht.loading.open()">
		<input type="hidden" name="financeId" th:value="*{financeId}"/>
		<input type="hidden" name="token" th:value="${session.token}">
		<input type="hidden" name="action" value="preview" />
		<input type="hidden" name="type" value="0" />
		<div class="card mb-3">
			<div class="card-body">
				<h4 class="card-title">请录入以下放款信息</h4>
				<div class="module">
					<table cellpadding="0" cellspacing="0" class="vTable">
						<tbody>
						<tr>
							<th class="label">授信合同名称</th>
							<td><input type="text" required name="contractName" th:value="*{@util.fStr(contractName)}" maxlength="100" /><span class="error" th:errors="*{contractName}" th:if="*{#fields.hasErrors('contractName')}"></span></td>
						</tr>
						<tr>
							<th class="label">授信合同编号</th>
							<td><input type="text" name="contractCode" th:value="*{@util.fStr(contractCode)}" required maxlength="100" /><span class="error" th:errors="*{contractCode}" th:if="*{#fields.hasErrors('contractCode')}"></span></td>
						</tr>
						<tr>
							<th class="label">币种</th>
							<td><select name="contractCurrency" style="color: red;">
								<option value="CNY">人民币元</option>
							</select></td>
						</tr>
						<tr>
							<th class="label">授信金额</th>
							<td><input type="amount" id="contractAmount" name="contractAmount" th:value="*{contractAmount}" />
								<span class="ml-1 required">元</span>
								<span class="error" th:errors="*{contractAmount}" th:if="*{#fields.hasErrors('contractAmount')}"></span>
							</td>
						</tr>
						<tr>
							<th class="label">放款时间</th>
							<td><input type="date" class="ht-dateInput" id="loanStartTime" name="loanStartTime"
									   th:value="*{#dates.format(loanStartTime,'yyyy-MM-dd')}"
									   data-options="endSelector:'[name=loanEndTime]'"  />
								<span class="error" th:errors="*{loanStartTime}" th:if="*{#fields.hasErrors('loanStartTime')}"></span></td>
						</tr>
						<tr>
							<th class="label">放款金额</th>
							<td><input type="amount" id="loanAmount" name="loanAmount" th:value="*{loanAmount}"  />
								<span class="ml-1">元</span><span class="error" th:errors="*{loanAmount}" th:if="*{#fields.hasErrors('loanAmount')}"></span>
							</td>
						</tr>
						<tr>
							<th class="label">利息</th>
							<td>
								<input type="rate" id="loanRate" name="loanRate" data-options="maxValue:100" th:value="*{loanRate}" />
								<span class="ml-1">%/年</span>
							</td>
						</tr>
						<tr>
							<th class="label">到期时间</th>
							<td><input type="date" class="ht-dateInput" id="loanEndTime" name="loanEndTime" th:value="*{#dates.format(loanEndTime,'yyyy-MM-dd')}"
									   data-options="startSelector:'[name=loanStartTime]'"  />
								<span class="error" th:errors="*{loanEndTime}" th:if="*{#fields.hasErrors('loanEndTime')}"></span>
							</td>
						</tr>
						<tr>
							<th class="label">普惠业务</th>
							<td>
								<span role="RadioGroup">
									<input type="hidden" name="bField" th:value="*{puhuiFlag}" role="RadioChecked" />
									<input type="radio" name="puhuiFlag" value="1">
									<span class="ml-1 mr-2">是</span>
									<input type="radio" name="puhuiFlag" value="2">
									<span class="ml-1">否</span>
								</span>
								<span class="error" th:errors="*{puhuiFlag}" th:if="*{#fields.hasErrors('puhuiFlag')}"></span>
							</td>
						</tr>
						</tbody>
					</table>
				</div>
			</div>
		</div>

		<div class="row">
			<input class="btn btn-primary btn-lg" type="submit" value="提 交" />
			<input class="btn btn-secondary btn-lg" type="button" value="取 消" onclick="parent.ht.closeAllFrameWindow()" />
		</div>
	</form>
</div>



<div class="ht-dialog auto" role="autoOpenDialog">
	<div class="wrapper">
		<h4 class="title" th:text="${result.msg}">提示</h4>
		<a class="ht-closeButton">close</a>
		<div class="content">
			<ul th:if="${#fields.hasErrors('dto.*')}">
				<li th:each="err:${#fields.errors('dto.*')}" th:text="${err}"></li>
			</ul>
		</div>
	</div>
</div>


</body>
<script>
    var ruleParser=new RuleParser("#form");
    ruleParser.loadRule(baseUrl+"/bank/bargain/createFormRule.json")
</script>
</html>